package database.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

public class SongBaseDao {

	public boolean updateSingTimes(String songId, Connection conn) throws SQLException {
		String sqlUpdate = "update song_base set singTimes=singTimes+1 where song_no = ?";
		PreparedStatement pstmt = null;
		try {
			pstmt = conn.prepareStatement(sqlUpdate);
			pstmt.setString(1, songId);
			pstmt.executeUpdate();
			
		} finally {
			if(pstmt != null){
				pstmt.close();
			}
		}
		return true;
	}

}
